<?php
/**
 * Created by PhpStorm.
 * User: wangjie
 * Date: 2018/9/12
 * Time: 9:45
 */
namespace backend\controllers;

use Yii;
use common\models\BaseModels;
use common\services\HttpUploadService;

class ParamsController extends BaseController
{

    /**
     * 图片上传页面
     * @return string
     */
    public function actionImageUpload()
    {
        return $this->render('image-upload', []);
    }

    /**
     * 图片上传
     * @return string
     */
    public function actionFileUp()
    {
        $files = $_FILES;
        $info = HttpUploadService::qiNiuPictureUpload($files["file"]["tmp_name"]);
        return $this->render('image-url', [
            'url' => $info,
        ]);
    }
}